#!/bin/bash
appName="blog-0.0.1-SNAPSHOT.jar"
# 查找并杀死与yourapp.jar相关的进程
PID=$(pgrep -f "java -jar ${appName}")
if [ -n "$PID" ]; then
    echo "Stopping the application..."
    kill -15 $PID
    echo "Application stopped. pid = "$PID
else
    echo "No running instance of the application found."
fi